import request from '@/util/request';


// 比赛
export function race(data, header = {}) {
	return request({
		method: "post",
		url: '/Courses/index.html',
		data: data,
		header: {
			'token': uni.getStorageSync('utoken'),
			'content-type': 'application/json',
			'X-Requested-With': 'XMLHttpRequest'
		}
	})
}

// 注册
export function register(data, header = {}) {
	return request({
		method: "post",
		url: '/Login/register.html',
		data: data,
		header: {
			'token': uni.getStorageSync('utoken'),
			'content-type': 'application/json',
			'X-Requested-With': 'XMLHttpRequest'
		}
	})
}

// 登录
export function doLogin(data, header = {}) {
	return request({
		method: "post",
		url: '/Login/doLogin.html',
		data: data,
		header: {
			'token': uni.getStorageSync('utoken'),
			'content-type': 'application/json',
			'X-Requested-With': 'XMLHttpRequest'
		}
	})
}